package org.blaznyoght.subtitles.ui;

import java.awt.Component;

import javax.swing.JLabel;
import javax.swing.JTable;
import javax.swing.table.DefaultTableCellRenderer;

import org.blaznyoght.subtitles.model.Time;

public class TimeRenderer extends DefaultTableCellRenderer {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = -6529356904749081082L;

	public TimeRenderer() {
		super();
	}
	
	@Override
	public Component getTableCellRendererComponent(JTable table, Object value,
			boolean isSelected, boolean hasFocus, int row, int column) {
		JLabel label = new JLabel();
		if (value instanceof Time) {
			label.setText(((Time) value).toString());
		}
		return label;
	}

}
